import type { PageResult } from '@/types/gloable'
import type { BannerItem, CategoryItem, GuessLike, HotMutli, PageParams } from '@/types/home'
import { http } from '@/utils/https'

export const getBannerAPI = (distributionSite = 1) => {
  return http<BannerItem[]>({
    url: '/home/banner',
    data: {
      distributionSite,
    },
  })
}

export const getCategroyListAPI = () => {
  return http<CategoryItem[]>({
    url: '/home/category/mutli',
  })
}

export const getHotMutliAPI = () => {
  return http<HotMutli[]>({
    url: '/home/hot/mutli',
  })
}

export const getGuessLikeAPI = (data?: PageParams) => {
  return http<PageResult<GuessLike>>({
    url: '/home/goods/guessLike',
    data,
  })
}
